www.gusucode.com > 落叶冰点万能企业网站内容管理系统 V9.1 > 落叶冰点万能企业网站内容管理系统 V9.1\code\admin\D_select_upload_file.asp

    <%


'**************************************************************
' 新动软网站管理系统
' 官方网站: http://www.aspcpu.com
' 系统作者: 阮丁远(网名:天下程序)
' Copyright 新动软网站管理系统 版权所有
'**************************************************************


%>




<LINK href="css.css" type=text/css rel=stylesheet>
<%

dir_set="../"


%>


<!--#include file=../inc/conn.asp-->
<!--#include file=../inc/Functionb.asp-->
<!--#include file=inc/checkadmin1.asp-->
<!--#include file=../inc/ajaxLIB.asp-->


<!--#include file=../inc/functionFiless.asp-->



<!--#include file=../inc/ND_class_function.asp-->

<%
AJAXshowLoader()


%>


<%


sssp=request("fpath")

if sssp<>"" then
sssspq=split(sssp,"/")

ooosss=""

sssr=ubound(sssspq)-1


dddds=sssspq(sssr)
end if













	Function RelativePath2RootPath(url)
		Dim sTempUrl
		sTempUrl = url
		If Left(sTempUrl, 1) = "/" Then
			RelativePath2RootPath = sTempUrl
			Exit Function
		End If

		Dim m_strPath
		m_strPath = Request.ServerVariables("SCRIPT_NAME")
		m_strPath = Left(m_strPath, InStrRev(m_strPath, "/") - 1)
		Do While Left(sTempUrl, 3) = "../"
			sTempUrl = Mid(sTempUrl, 4)
			m_strPath = Left(m_strPath, InStrRev(m_strPath, "/") - 1)
		Loop
		RelativePath2RootPath = m_strPath & "/" & sTempUrl
	End Function
%>




<div  id="l_do" style="filter:blendTrans(duration=1);  width:734px; z-index:-1; border: 1px dashed #999999;left: 3px; top: 20px; height: 40px;">

<script language="javascript">
function outd(ss) {
window.opener.document.all.myform.filePath.value= ss;
window.close();
}
</script>









</div>

<br /><br />









<div  id="l_path" style="filter:blendTrans(duration=1);  width:734px; z-index:-1; border: 1px dashed #999999;left: 3px; top: 120px; height: 30px;">


<table width=730 >

<tr>

<td>

当前路径:/uploadfile/image/<%=request("fpath")%>

</td>

</tr>


</table>




</div>






<br /><br />









<div  id="l_list" style="filter:blendTrans(duration=1);  width:774px; z-index:-1; border: 1px dashed #999999;left: 3px; top: 120px; height: 121px;width:730px">




<table  height="107" width=730 border="0" cellpadding="0" cellspacing="0" bordercolor="#999999">




<%
set filea=new Cls_FSO
set fileb=new DosAsp 

if filea.ReportFolderStatus(server.mappath("../uploadfile/image/"))=1 then



call list_cst_label()


else


%>
<script language="javascript">


alert("目录不存在,即将创建");

</script>



<%

call createfile("../uploadfile/image/test.asp","1111",true)



call deletefile("../uploadfile/image/test.asp")



call list_cst_label()



end  if 






nofolder=0
nofiles=0

function list_cst_label()






ss3=filea.ShowFolderList(server.mappath("../uploadfile/image/"&request("fpath")))

ss4=filea.ShowFileList(server.mappath("../uploadfile/image/"&request("fpath")))






if ss3=-1 or ss3="" then

nofolder=1

else

ss3=left(ss3,len(ss3)-1)'去掉最后一个|号



'处理文件夹

fl1=split(ss3,"|")


numf1=ubound(fl1)+1


end if

if ss4=-1 or ss4="" then

nofiles=1

else
ss4=left(ss4,len(ss4)-1) '去掉最后一个|号



'处理文件

fl2=split(ss4,"|")


numf2=ubound(fl2)+1


end if







'response.write numf1+numf2


redim flst(numf1+numf2,2)

for i=0 to numf1-1

flst(i,0)=fl1(i)
flst(i,1)=0 '=0表示文件夹


next

for i=numf1 to numf1+numf2-1

ii=i-numf1

flst(i,0)=fl2(ii)
flst(i,1)=1 '=1表示文件


next

yy=5
xx=1


per_p=xx*yy






if request("page")="" then
npage=1
else
npage=cint(request("page"))
end if

ptr=0



for iip=1 to npage-1


ptr=ptr+per_p

next




%>




<tr width=730 align=left height=60>
<td>
<%
sssp=request("fpath")
sssspq=split(sssp,"/")

ooosss=""

for iii=0 to ubound(sssspq)-2

ooosss=ooosss&sssspq(iii)&"/"



next



%>



<a href="D_select_upload_file.asp?fpath=<%=ooosss%>">
<img src="IMG/Folder/folder.gif" border=0>(返回上一级目录)

</a>



</td>

</tr>







<%



for ix=1 to xx
if (ptr-(npage-1)*per_p)>(per_p-1) or ptr>numf1+numf2-1 then exit for
%>

<tr width=730 align=center>


<%

for iy=1 to yy
if (ptr-(npage-1)*per_p)>(per_p-1)  or ptr>numf1+numf2-1 then exit for

%>









<td width=50  align=center>




<table  width=150 style="word-break:break-all">


<tr>

<td>

<%


if request("fpath")="" then

fph=replace(flst(ptr,0),"&","----")&"/"

else
sssd="/"
if instr(request("fpath"),"/")<>0 then sssd=""

fph=request("fpath")&sssd&replace(flst(ptr,0),"&","----")&"/"

end if

if flst(ptr,1)=0 then

sss2="<a href='D_select_upload_file.asp?fpath="&fph&"'>"&flst(ptr,0)&"</a>"
sss22="<a href='D_select_upload_file.asp?fpath="&fph&"'>"
else


ss4=fph
ss4=left(ss4,len(ss4)-1)


ssss4=RelativePath2RootPath("../uploadfile/image/"&ss4)




sss2="<a href=# onclick="&chr(34)&"outd('"&ssss4&"')"&chr(34)&">"&flst(ptr,0)&"</a>"

sss22="<a href=#  onclick="&chr(34)&"outd('"&ssss4&"')"&chr(34)&">"
end if

%>




<%if flst(ptr,1)=0 then%>

<%=sss22%>
<img src="IMG/Folder/folder.gif" border=0>

</a>

<%else%>

<%=sss22%>
<img src="../uploadfile/image/<%=ss4%>"  width=50 border=0>
</a>

<%end if%>
</td>

</tr>



<tr>

<td width=160  style="word-break:break-all">
<%=sss2%>




</a>
</td>

</tr>

</table>

</td>






<%
ptr=ptr+1

next

%>

</tr>

<%
next

if nofiles=1 and nofolder=1 then
%>


<tr width=730 align=center><td>
此文件夹内无内容
</td>
</tr>


<%end if%>

<tr width=730  align="center"><td align="center" colspan=8>


<%
zong_p=cint((numf1+numf2)/per_p)
if ((numf1+numf2) mod per_p)>0 then

zong_p=zong_p+1

end if




if npage<zong_p then

www3="<a href='D_select_upload_file.asp?page="&npage+1&"&fpath="&request("fpath")&"'>下一页</a>"

end if

if npage>1 then

www2="<a href='D_select_upload_file.asp?page="&npage-1&"&fpath="&request("fpath")&"'>上一页</a>"

end if

if npage>=1 then

www1="<a href='D_select_upload_file.asp?page="&"1"&"&fpath="&request("fpath")&"'>首页</a>"

end if


if npage<=zong_p then

www4="<a href='D_select_upload_file.asps?page="&zong_p&"&fpath="&request("fpath")&"'>末页</a>"

end if


swww="&nbsp;&nbsp;&nbsp;"&www1&"&nbsp;&nbsp;&nbsp;"&www2&"&nbsp;&nbsp;&nbsp;"&www3&"&nbsp;&nbsp;&nbsp;"&www4&"&nbsp;&nbsp;&nbsp;"&npage&"/"&zong_p&"页"

%>

<%

=swww

%>



</td></tr>






<%
end function

%>






<table>



</div>









<script language=javascript>
AJAXfade(1,'l_list')
AJAXfade(1,'l_do')
AJAXfade(1,'l_path')
</script>


<%
AJAXcloseLoader()
%>